package com.corecloud.controller.sms;

import com.corecloud.controller.sys.VerifyController;
import com.corecloud.service.sms.SmsCodeSender;
import org.springframework.stereotype.Service;

@Service("defaultSmsCodeSender")
public class DefaultSmsCodeSender implements SmsCodeSender {

    @Override
    public Integer send(String mobile, String code, String codePhoneType) {
        VerifyController verifyController = new VerifyController();
        Integer type = null;
        try {
//            调用短信发送请求接口
            type = verifyController.sendSms(mobile, code, codePhoneType);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return type;
    }
}
